<#assign pageTitle = "我的消息" />
<#assign pageHeader>
	<script type="text/javascript">
		function delConfirm(id) {
			return layer.confirm("确认要删除此条站内信吗？", {
				icon: 3,
				title: "系统提示",
				btn: ['确认', '取消']
			}, function (index) {
				layer.close(index);
				$.ajax({
					type: "POST",
					dataType: "json",
					url: "/user/ajax/delLetterInbox",
					data: {"id": id},
					cache: true,
					success: function (result) {
						if (result.code === 0) {
							layer.msg("删除成功", {time: 1000});
							window.location.reload()
						} else {
							layer.msg(result.msg, {time: 3000});
						}
					}
				});
			});
		}
	</script>
</#assign>
<#assign pageContent>
	<article class="w80 fl">
		<div class="u-r-cont">
			<section>
				<div class="">
					<section class="u-r-tit-all">
						<h2 class="unFw">
							<span class="current">消息中心</span>
						</h2>
					</section>
					<div class="u-r-all-box">
						<#if letterList??>
							<div class="u-sys-news">
								<ul class="u-sys-list">
									<#list letterList as qltl>
										<li id="del${qltl.id }">
											<div>
												<section class="u-s-l-txt">

													<#if qltl.isRead==0>
														<p class="fsize14 fbold">${qltl.content}</p>
													<#else >
														<p class="fsize14 c-999">${qltl.content}</p>
													</#if>

													<em class="wd-ico">
														<#if qltl.isRead==0>
															<img src="/static/qdxwx/img/wd-bg-u.png">
														</#if>
													</em>
													<a href="javascript:void (0)" onclick="delConfirm(${qltl.id})" class="u-s-l-sc-ico" title="删除">
														&nbsp;
													</a>
												</section>
												<section class="clearfix hLh30">
												<span class="fl">
													<tt class="fsize14 c-999 f-fM">${qltl.createTime?string("yyyy-MM-dd")}</tt>
												</span>
												</section>
											</div>
										</li>
									</#list>
								</ul>
							</div>
						<#else>
							<section class="no-data-wrap">
								<em class="icon30 no-data-ico">&nbsp;</em>
								<span class="c-666 fsize14 ml10 vam">您还没有收到消息哦！</span>
							</section>
						</#if>
						<!-- 公共分页 开始 -->
						<div class="paging" id="showPages"></div>
						<!-- 公共分页 结束 -->
					</div>
				</div>
			</section>
			<!-- /Wo的消息 -->
		</div>
	</article>
	<!-- /右侧内容区 结束 -->
</#assign>
<#assign pageFooter>
	<script type="text/javascript" src="/static/js/page.js"></script>
	<script type="text/javascript">
		var options = {
			currentPage : ${page.currentPage}
			,totalPage : ${totalPages}
		};
		$(function () {
			showPages(options);
		});
	</script>
</#assign>
<#include "../layouts/layout_uc.ftl">

